package iotwisp.school.user.qo;

import iotwisp.base.cqrs.BaseQO;
import iotwisp.base.orm.query.QueryCondition;
import iotwisp.base.orm.query.QueryConditionType;
import iotwisp.base.orm.query.QueryConfig;
import lombok.Data;
import lombok.EqualsAndHashCode;

@SuppressWarnings("serial")
@Data
@EqualsAndHashCode(callSuper = false)
@QueryConfig(daoBeanId = "roleService")
public class RoleQO extends BaseQO<String> {

    @QueryCondition(name = "name", ifTrueUseLike = "nameLike", type = QueryConditionType.LIKE_ANYWHERE)
    private String name;

    private Boolean nameLike = false;

    @QueryCondition(name = "enable")
    private Boolean enable;

    @QueryCondition(name = "permissions", type = QueryConditionType.FETCH_EAGER)
    private Boolean fetchPermissions;
}